package com.ruoyi.channel.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.mapper.ChannelUnionCountInfoMapper;
import com.ruoyi.db.domain.ChannelUnionCountInfo;
import com.ruoyi.channel.service.IChannelUnionCountInfoService;

/**
 * 渠道联登统计信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-15
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class ChannelUnionCountInfoServiceImpl implements IChannelUnionCountInfoService 
{
    @Autowired
    private ChannelUnionCountInfoMapper channelUnionCountInfoMapper;

    /**
     * 查询渠道联登统计信息
     * 
     * @param id 渠道联登统计信息主键
     * @return 渠道联登统计信息
     */
    @Override
    public ChannelUnionCountInfo selectChannelUnionCountInfoById(Long id)
    {
        return channelUnionCountInfoMapper.selectChannelUnionCountInfoById(id);
    }

    /**
     * 查询渠道联登统计信息列表
     * 
     * @param channelUnionCountInfo 渠道联登统计信息
     * @return 渠道联登统计信息
     */
    @Override
    public List<ChannelUnionCountInfo> selectChannelUnionCountInfoList(ChannelUnionCountInfo channelUnionCountInfo)
    {
        return channelUnionCountInfoMapper.selectChannelUnionCountInfoList(channelUnionCountInfo);
    }

    /**
     * 查询渠道联登统计信息列表
     *
     * @param channelUnionCountInfo 渠道联登统计信息
     * @return 渠道联登统计信息
     */
    @Override
    public List<Map<String, Object>> selectChannelUnionCountInfoMapList(ChannelUnionCountInfo channelUnionCountInfo)
    {
        return channelUnionCountInfoMapper.selectChannelUnionCountInfoMapList(channelUnionCountInfo);
    }

    /**
     * 新增渠道联登统计信息
     * 
     * @param channelUnionCountInfo 渠道联登统计信息
     * @return 结果
     */
    @Override
    public int insertChannelUnionCountInfo(ChannelUnionCountInfo channelUnionCountInfo)
    {
        channelUnionCountInfo.setCreateTime(DateUtils.getNowDate());
        return channelUnionCountInfoMapper.insertChannelUnionCountInfo(channelUnionCountInfo);
    }

    /**
     * 修改渠道联登统计信息
     * 
     * @param channelUnionCountInfo 渠道联登统计信息
     * @return 结果
     */
    @Override
    public int updateChannelUnionCountInfo(ChannelUnionCountInfo channelUnionCountInfo)
    {
        channelUnionCountInfo.setUpdateTime(DateUtils.getNowDate());
        return channelUnionCountInfoMapper.updateChannelUnionCountInfo(channelUnionCountInfo);
    }

    /**
     * 批量删除渠道联登统计信息
     * 
     * @param ids 需要删除的渠道联登统计信息主键
     * @return 结果
     */
    @Override
    public int deleteChannelUnionCountInfoByIds(Long[] ids)
    {
        return channelUnionCountInfoMapper.deleteChannelUnionCountInfoByIds(ids);
    }

    /**
     * 删除渠道联登统计信息信息
     * 
     * @param id 渠道联登统计信息主键
     * @return 结果
     */
    @Override
    public int deleteChannelUnionCountInfoById(Long id)
    {
        return channelUnionCountInfoMapper.deleteChannelUnionCountInfoById(id);
    }
}
